package databaseclient;


import java.awt.*;
import java.awt.event.*;
import java.net.URL;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.Highlighter.HighlightPainter;
import javax.swing.tree.*;
import java.util.*;
import javax.swing.plaf.metal.MetalIconFactory;
import java.lang.reflect.Array;
import javax.swing.table.DefaultTableModel;
import javax.swing.text.DefaultHighlighter;
import javax.swing.text.Document;
import javax.swing.text.Highlighter.Highlight;
import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;
/*
 * class SplitPanelRight 
 */
class SplitPanelRight extends JPanel
                          {
   
   // intialize varible 
    private JSplitPane splitPane;
  
    private JPanel jPtop;//panel top
    private JPanel jPbot;// panel bottom
    private   JScrollPane scrollPaneTop; // scrollpane of top
    private   JScrollPane scrollPaneBottom;//srollpane of bottom
    // intialize constructorr
    public SplitPanelRight() {

        jPtop = new JPanel(new GridLayout());
        jPbot = new JPanel(new GridLayout()); 
   
        scrollPaneTop = new JScrollPane(jPtop);
       
        
        scrollPaneBottom = new JScrollPane(jPbot);

        
        //Create a split pane with the two scroll panes in it.
        splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
                                   scrollPaneTop, scrollPaneBottom);
        splitPane.setOneTouchExpandable(true);
        splitPane.setDividerLocation(500);

      
        Dimension minimumSize = new Dimension(100, 50);
        scrollPaneTop.setMinimumSize(minimumSize);
        scrollPaneBottom.setMinimumSize(minimumSize);

        
    }
   /* method getPanelTop get panel of top Splitpanel
     * @parm no
     * @return jPtop : Jpanel 
     * 
     */
    public JPanel getPanelTop() {
        
        return jPtop;
    }
    /*@method getPanelBottom get panel of bottom of Splitpanel
     * @parm no
     * @return JPbot :Jpane
     */
      public JPanel getPanelBottom() {
        return jPbot;
    }
      /*
       * @method getSpliPane :vod  get SplitPanel
       * @param no
       * @return splitpane : JSplitpane
       */
    public JSplitPane getSplitPane() {
        return splitPane;
    }
    /*
     *@method   setSplitPaneTop set pane top of Splitpane
     * @parm top : Container
     * @return no
     */
   public void setSplitPaneTop(Container top)
   {
        jPtop.removeAll();
        jPtop.add(top,FlowLayout.LEFT);
     
   }
   /*
    * @method setSplitPaneBottom : void  ; set pane of bottom in right Splitpanel
    * @parm bottom : Container
    * @return no
    */
    public void setSplitPaneBottom(Container bottom)
   {
      jPbot.removeAll();
      jPbot.add(bottom,FlowLayout.LEFT);
   }
   
}
